
import { axiosGet, axiosPost, axiosPut } from '/@/api/RequestBase';
import { SqlSugarPagedList, BaseKeywordPageInput } from '/@/api/BaseDto';

import { BasShuXueZhiZhengInput } from './dto/BasShuXueZhiZhengInput';
import { BasShuXueZhiZhengOutput } from './dto/BasShuXueZhiZhengOutput';
import { BasShuXueZhiZhengAllOutput } from './dto/BasShuXueZhiZhengAllOutput';

export type { BasShuXueZhiZhengInput, BasShuXueZhiZhengOutput, BasShuXueZhiZhengAllOutput, };

const service = 'BasShuXueZhiZheng/'; // 要写后面的斜杠, 不要写前面的斜杠

export const BasShuXueZhiZhengApi = {
	page: (data: BaseKeywordPageInput) => {
		return axiosPost<SqlSugarPagedList<BasShuXueZhiZhengOutput>>(service + 'page', data);
	},
	all: () => {
		return axiosPost<Array<BasShuXueZhiZhengAllOutput>>(service + 'all', {});
	},
	get: (id: number) => {
		return axiosGet<BasShuXueZhiZhengOutput>(service + `get/${id}`);
	},
	add: (data: BasShuXueZhiZhengInput) => {
		return axiosPost<number>(service + 'add', data);
	},
	update: (data: BasShuXueZhiZhengInput) => {
		return axiosPut<boolean>(service + 'update', data);
	},
}
